package org.cptz.game.util;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

public class ReqUtil {
    public static Map<String, Object> resolve(HttpServletRequest req) {
        Map<String, String[]> parameterMap = req.getParameterMap();
        Map<String, Object> unwrap = new HashMap<>();
        for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
            unwrap.put(entry.getKey(), entry.getValue());
        }
        return unwrap;
    }
}
